<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- reorganize this, put it at beginner, intermediate and advanced. then let users determine the other data with the expert control. -->
<!-- How to get a success experience out of this? allow dragging of links and text files? allow the user to embed links? that's a good question. I'm not entirely satisfied with the way that web applications work. -->
<!-- put all of this in a box in the center this way it stays relatively accessible to the user even if they expand something.-->
<!-- Let the user save their searches? make the system modal? -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
<head>
	<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
	<meta http-equiv="content-style-type" content="text/css" />

	<title>NAIST Language Tutor</title>
	<link rel="stylesheet" type="text/css" href="/stylesheets/style.css" />
</head>

<body>
<div id="heading">
<h1>NAIST Language Tutor</h1>
<h2>for students</h2>
</div>

<h3>「<%= h params[:direction_word] %>」の例文</h3>
<h4>語義：<%= h params[:acceptation_text] -%></h4>

<table>
	<tr><td>
<h3> Sentence Length</h3>
<%= form_tag :action=>:show_example, :direction_word => params[:direction_word], :acceptation_id => params[:acceptation_id], :acceptation_text => params[:acceptation_text], :text => params[:text] %>
<table id="len_settings">
	<tr>
		<td>maximum:</td>
		<td><%= text_field "sentence_max", nil, "size" => 20 %></td>
		<td>words</td>
	</tr>
	<tr>
		<td>minimum:</td>
		<td><%= text_field "sentence_min", nil, "size" => 20 %></td>
		<td>words</td>
	</tr>
</table>
<%= submit_tag "filtering" %>
</td><td>
<h3>Grade</h3>
<%= form_tag :action=>:show_example, :direction_word => params[:direction_word], :acceptation_id => params[:acceptation_id], :acceptation_text => params[:acceptation_text], :text => params[:text] %>
<table id="grade_settings">
	<tr>
		<td>単語:</td>
		<td><%= text_field "word_rank", nil, "size" => 20 %></td>
		<td>級</td>
	</tr>
	<tr>
		<td>漢字:</td>
		<td><%= text_field "kanji_rank", nil, "size" => 20 %></td>
		<td>級</td>
	</tr>
<!--	<tr>
		<td>minimum frequency:</td>
		<td><%= text_field "min_freq", nil, "size" => 20 %></td>
		<td></td>
	</tr>-->
</table>
<%= end_form_tag %>
</td></tr>
</table>

<ul>
<!--	<%- p @example_length.keys.sort.map -%>-->
<%- @example_visible.each do |sent,visible| -%>
	<%= h sent %>
<%- end -%>
</ul>

<%= button_to("戻る", :action=>"search", :text => params[:text]) %>

</body>
</html>
